#include "plugin_meta.h"
#include <iostream>

using namespace OHOS::Media::Plugin;

#define CHECK(x) ((x)? (void)(0) : (void(fprintf(stdout, "Failed at %d:%s: %s\n", __LINE__, __FILE__, #x)), std::exit(EXIT_FAILURE)))

int test_meta2()
{
    std::cout<<"Test meta 2 ..." << std::endl;

    Meta meta;
    meta.Set<Key::STR_KEY_1>(100);
    uint32_t val;
    CHECK(meta.Get<Key::STR_KEY_1>(val));
    CHECK(val == 100);

    meta.Set<Key::STR_KEY_2>("hello world");
    std::string val2;
    CHECK(meta.Get<Key::STR_KEY_2>(val2));
    CHECK(val2 == "hello world");
    return 0;
}